package com.irdstudio.efp.esb.api.bean.psd.query.req;

import com.alibaba.fastjson.annotation.JSONField;
import com.irdstudio.basic.framework.core.annotation.DicType;
import com.irdstudio.efp.esb.api.common.GroupeInterface.psd;
import com.irdstudio.efp.esb.common.constant.nls.PSDRpyMdEnum;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

public class ContMsgAssembleReqBean implements Serializable {

    /**
     * 支用申请流水号	String（64）
     */
    @JSONField(name = "WthdwAppSrlNo")
    @Length(max = 64, groups = {psd.class})
    private String wthdwApSrlNo;
    /**
     * 授信申请流水号	String（32）
     */
    @JSONField(name = "CrAppSrlNo")
    @NotNull(groups = {psd.class})
    @NotEmpty(groups = {psd.class})
    @Length(max = 32, groups = {psd.class})
    private String crAppSrNo;
    /**
     * 产品代码	String（11）
     */
    @JSONField(name = "PdCd")
    @NotNull(groups = {psd.class})
    @NotEmpty(groups = {psd.class})
    @Length(max = 11, groups = {psd.class})
    private String pdCd;
    /**
     * 贷款金额	Double(21,2)
     */
    @JSONField(name = "LoanAmt")
    @Digits(integer = 21, fraction = 2, groups = {psd.class}, message = "贷款金额校验异常")
    private BigDecimal loanAmt;
    /**
     * 还款方式	String（2）
     * //	FB01 到期还本
     * //	FB02 分期等额本金
     * //	FB03 分期等额本息
     * //	FB99 其他
     */
    @JSONField(name = "RpymtMd")
    @DicType(dicType = PSDRpyMdEnum.class, method = "getValue", groups = {psd.class})
    private String rpymtMd;
    /**
     * 合同类型	String（7）
     */
    @JSONField(name = "ContrTp")
    @NotNull(groups = {psd.class})
    @NotEmpty(groups = {psd.class})
    @Length(max = 2, groups = {psd.class})
    private String contrTp;


    public String getWthdwApSrlNo() {
        return wthdwApSrlNo;
    }

    public void setWthdwApSrlNo(String wthdwApSrlNo) {
        this.wthdwApSrlNo = wthdwApSrlNo;
    }

    public String getCrAppSrNo() {
        return crAppSrNo;
    }

    public void setCrAppSrNo(String crAppSrNo) {
        this.crAppSrNo = crAppSrNo;
    }

    public String getPdCd() {
        return pdCd;
    }

    public void setPdCd(String pdCd) {
        this.pdCd = pdCd;
    }

    public BigDecimal getLoanAmt() {
        return loanAmt;
    }

    public void setLoanAmt(BigDecimal loanAmt) {
        this.loanAmt = loanAmt;
    }

    public String getRpymtMd() {
        return rpymtMd;
    }

    public void setRpymtMd(String rpymtMd) {
        this.rpymtMd = rpymtMd;
    }

    public String getContrTp() {
        return contrTp;
    }

    public void setContrTp(String contrTp) {
        this.contrTp = contrTp;
    }
}